#include<stdio.h>
int main()
{
	int i = 0;
	int j = 0;
	int arr[10][10] = { 0 };
	arr[1][1] = 1;
	arr[2][1] = 1;
	arr[2][2] = 1;
	for (i = 1; i <= 10; i++)
	{
		for (j = 1; j <= i; j++)
		{
			if (j == 1 || j == i)
				arr[i][j] = 1;
			else
			{
				arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j];
			}
			printf("%-5d", arr[i][j]);
		}
		printf("\n");
	}
	return 0;
}